package com.clouddisk.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import com.clouddisk.common.core.domain.entity.UserFile;
import com.clouddisk.system.domain.vo.file.FileListVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IUserFileService extends IService<UserFile> {
    List<UserFile> selectUserFileByNameAndPath(String fileName, String filePath, Long userId,String fileDeptName);
    List<UserFile> selectSameUserFile(String fileName, String filePath, String extendName, Long userId);

    IPage<FileListVo> userFileList(Long userId,String fileDeptName, String filePath, Long beginCount, Long pageCount);
    void updateFilepathByUserFileId(String userFileId, String newfilePath, long userId);
    void userFileCopy(String userFileId, String newfilePath, long userId);

    IPage<FileListVo> getFileByFileType(Integer fileTypeId,String name, Long currentPage, Long pageCount, long userId);
    List<UserFile> selectUserFileListByPath(String filePath, Long userId);
    List<UserFile> selectFilePathTreeByUserId(Long userId, String fileDeptName);
    void deleteUserFile(String userFileId, Long sessionUserId, String fileDeptName);

    List<UserFile> selectUserFileByLikeRightFilePath(@Param("filePath") String filePath, @Param("userId") long userId, @Param("fileDeptName") String fileDeptName);

}
